﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using CapturarObjetos.Nucleo;
using CapturarObjetos.Objetos;

namespace CapturarObjetos.Nucleo
{
    public class Telas
    {
        public enum Tela { TELA_INICIAL, MENU,JOGO, CREDITOS, PONTUACAO, GAME_OVER, PAUSA };
        private ContentManager Content;

        public Telas(ContentManager Content)
        {
            this.Content = Content;
        }
        public void tela_inicial_draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Begin(
                    SpriteSortMode.BackToFront,
                    BlendState.AlphaBlend,
                    SamplerState.LinearWrap,
                    DepthStencilState.Default,
                    RasterizerState.CullNone);
            spriteBatch.Draw(Content.Load<Texture2D>("images/tela_inicial"), new Vector2((Game1.largura / 2) - 250, (Game1.altura / 2) - 200), Color.White);
            spriteBatch.End();

            //Fazer tela inicial com logos
            //"sevencg.com.br/logos/"
        }
        public void tela_inicial_update(MouseState mouse_atual, MouseState mouse_anterior, KeyboardState teclado_atual, KeyboardState teclado_anterior, GameTime gameTime)
        {
            if ((teclado_anterior.IsKeyDown(Keys.Enter)) || (gameTime.TotalGameTime.Seconds > 5))
            {
                Game1.estadoAtual = Tela.JOGO;
            }   
        }
        public void menu()
        {

        }
        public void creditos()
        {

        }
        public void pontuacao()
        {

        }
        public void game_over(SpriteBatch spriteBatch)
        {
            spriteBatch.Begin(
                    SpriteSortMode.BackToFront,
                    BlendState.AlphaBlend,
                    SamplerState.LinearWrap,
                    DepthStencilState.Default,
                    RasterizerState.CullNone);
            spriteBatch.Draw(Content.Load<Texture2D>("images/game_over"), new Vector2((Game1.largura / 2) - 300 , (Game1.altura / 2) - 150), Color.White);
            spriteBatch.End();
        }
    }
}
